Kanzi  3.9.7
Kanzi Engine API
Log category utility macros

Use these macros to define new log categories and operate on existing ones. More...

Collaboration diagram for Log category utility macros:

Macros

#define KZ_LOG_CATEGORY_GENERIC_DEFAULT_STATE
 Define this macro to KZ_LOG_ENABLED_CATEGORY or KZ_LOG_DISABLED_CATEGORY to enable or disable KZ_LOG_CATEGORY_GENERIC category. More...
 
#define KZ_LOG_CREATE_CATEGORY(state, name)
 Use the KZ_LOG_CREATE_CATEGORY macro to create a log category. More...
 
#define KZ_LOG_DISABLED_CATEGORY
 The disabled log category state. More...
 
#define KZ_LOG_ENABLED_CATEGORY
 The enabled log category state. More...
 
#define KZ_LOG_GET_CATEGORY_NAME(category)
 To get the name of the log category, use KZ_LOG_GET_CATEGORY_NAME. More...
 
#define KZ_LOG_GET_CATEGORY_STATE(category)
 To get state of the log category, use KZ_LOG_GET_CATEGORY_STATE macro. More...
 
#define KZ_LOG_IS_CATEGORY_ENABLED(category)
 To check if the log category is enabled, use KZ_LOG_IS_CATEGORY_ENABLED. More...
 

Detailed Description

Use these macros to define new log categories and operate on existing ones.

Macro Definition Documentation

#define KZ_LOG_ENABLED_CATEGORY

The enabled log category state.

#define KZ_LOG_DISABLED_CATEGORY

The disabled log category state.

#define KZ_LOG_CREATE_CATEGORY (   state,
  name 
)

Use the KZ_LOG_CREATE_CATEGORY macro to create a log category.

Use the state parameter to determine the state of the log category. Use the log category state for log message filtering. See Classifying and filtering log messages.

The name parameter is a short string identity of the log category that is passed to the logger when the log message is written. You can implement a logger to include the category name in the log message. See kanzi::AbstractLogger.

Parameters
stateThe state of the log category. To enable the log category, set the state to KZ_LOG_ENABLED_CATEGORY, and to disable it, set the state to KZ_LOG_DISABLED_CATEGORY.
nameThe name of the log category.
See also
kanzi::AbstractLogger, Classifying and filtering log messages, KZ_LOG_CATEGORY_GENERIC.
#define KZ_LOG_GET_CATEGORY_STATE (   category)

To get state of the log category, use KZ_LOG_GET_CATEGORY_STATE macro.

For detailed information on the log category state see Log category.

Parameters
categorythe log category.
Returns
State of log category.
#define KZ_LOG_GET_CATEGORY_NAME (   category)

To get the name of the log category, use KZ_LOG_GET_CATEGORY_NAME.

For detailed information on the log category name see KZ_LOG_CREATE_CATEGORY.

Parameters
categoryThe log category.
Returns
The name of log category.
#define KZ_LOG_IS_CATEGORY_ENABLED (   category)

To check if the log category is enabled, use KZ_LOG_IS_CATEGORY_ENABLED.

Parameters
categoryThe log category.
Returns
If the category is enabled, 1, otherwise 0.
#define KZ_LOG_CATEGORY_GENERIC_DEFAULT_STATE

Define this macro to KZ_LOG_ENABLED_CATEGORY or KZ_LOG_DISABLED_CATEGORY to enable or disable KZ_LOG_CATEGORY_GENERIC category.

This macro is used to set the state of the KZ_LOG_DISABLED_CATEGORY. If you do not define this macro before including this header then it will be defined to the value of KZ_LOG_ENABLED_CATEGORY.